﻿using System.Text;

using System.ComponentModel.DataAnnotations;


using System;
using System.Collections.Generic;

using System.Linq;
using Wedo.Mvc.Utility;
using Wedo.Domain.Models;
using System.ComponentModel;

namespace Wedo.Recognition.Domain.Models
{
    /// <summary>
    /// 放单信息
    /// </summary>
    [System.ComponentModel.DisplayName("放单信息")]
    public class ReleaseOrder : Entity
    {
         /// <summary>
        /// 银行账单信息编号
        /// </summary>
        public Guid BankDataID { set; get; }

        /// <summary>
        /// 银行账单信息
        /// </summary>        
        public BankData BankData { get; set; }
 
        /// <summary>
        /// 客户名称
        /// </summary>
        [DisplayName( "客户名称")]
        public string CustomerName { set; get; }

        /// <summary>
        /// 客户编号
        /// </summary>
        [DisplayName( "客户编号")]
        public string CustomerCode { set; get; }

        /// <summary>
        /// 订单编号
        /// </summary>
        [DisplayName( "订单编号")]
        public string OrderNum { set; get; }

        /// <summary>
        /// 签出金额
        /// </summary>
        [DisplayName( "签出金额")]
        public decimal Amount { set; get; }

        /// <summary>
        /// 所占比例
        /// </summary>
        [DisplayName( "所占比例")]
        public decimal? Percent { set; get; }

        #region 处理

        /// <summary>
        /// 申请人
        /// </summary>
        [DisplayName( "申请人")]
        //[DataColumn(60, 60)]
        public string ApplyMan { set; get; }

        /// <summary>
        ///申请时间
        /// </summary>
        [DisplayName( "申请时间")]
        //[DataColumn(70, 60)]
        [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:yyyy-MM-dd}")]
        public DateTime? ApplyTime { set; get; }

        /// <summary>
        /// 状态 1 等待审批 2 同意放单 3 拒绝放单
        /// </summary>
        [DisplayName( "状态")]
        //[DataColumn(80, 60)]
        public int Status { set; get; }

        /// <summary>
        /// 审批人
        /// </summary>
        [DisplayName( "审批人")]
        ////[DataColumn(80, 60)]
        public string Approver { set; get; }

        /// <summary>
        ///  审批时间
        /// </summary>
        [DisplayName( "审批时间")]
        [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:yyyy-MM-dd}")]
        public DateTime? ApprovalTime { set; get; }

        #endregion

        /// <summary>
        /// 放单批次
        /// </summary>
        public Guid? BatchID { get; set; }

        /// <summary>
        /// 认款ID
        /// </summary>
        public Guid PaymentApplyID { get; set; }

        /// <summary>
        /// 签出ID
        /// </summary>
        public Guid CheckRecordID { get; set; }
    }

    public class ReleaseOrderSearch : CommonSearchModel {
        /// <summary>
        /// 审批人
        /// </summary>
        [DisplayName( "审批人")]
        public string Approver { get; set; }
    }
 }
